package com.cc.app.love;

import android.graphics.PointF;
import android.graphics.RectF;

public class Target {

    private int w = 20;

    private float x;

    private float y;

    private float alpha = 1;

    private float scaleX;

    private float scaleY;

    private RectF rect = new RectF();

    private int color;

    private int type;


    public Target() {
        this(0, 0);
    }

    public Target(int color, int type) {
        this.color = color;
        this.type = type;
    }

    public int getColor() {
        return color;
    }

    public int getType() {
        return type;
    }

    public RectF getRect() {
        return rect;
    }

    public float getX() {
        return x;
    }

    public void setX(float x) {
        this.x = x;
    }

    public void setY(float y) {
        this.y = y;
    }


    public void setLocation(PointF point) {
        this.x = point.x;
        this.y = point.y;

        rect.left = x - w;
        rect.right = x + w;
        rect.top = y - w;
        rect.bottom = y + w;
    }

    public float getAlpha() {
        return alpha;
    }

    public void setAlpha(float alpha) {
        this.alpha = alpha;
    }

    public float getScaleX() {
        return scaleX;
    }

    public void setScaleX(float scaleX) {
        this.scaleX = scaleX;
    }

    public float getScaleY() {
        return scaleY;
    }

    public void setScaleY(float scaleY) {
        this.scaleY = scaleY;
    }
}
